import {getBaseCategoryList} from "@/api";

const actions = {

  async getCategoryList({commit}, payload) {
    const result = await getBaseCategoryList()
    if (result.code === 200) {
        commit('CATEGORY_LIST', result.data)
    }
  }
}
const mutations = {
    CATEGORY_LIST(state, value) {
        state.categoryList = value
    }
}

const state = {
    categoryList: []
}
const getters = {}
export default {
    namespace: true,
    actions, mutations, state, getters
}